<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>作品列表</title>
</head>
<body>

</body>
</html>
<script>
    fetch('/artwork/p',{
        credentials:"include",
        method:"POST"
    }).then(res=>{
        return res.json()
    }).then(json=>{
        for(let post of json){
            let ul = document.createElement('ul')
            let a = document.createElement('a')
            a.innerText = post['title']
            a.href='/p/'+post['id']
            let a1 = document.createElement('a')
            a1.innerText = post['nickname']
            ul.appendChild(a)
            ul.appendChild(a1)
            document.body.appendChild(ul)
        }
    })
</script>